<?php

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
	
    /**
     *
     * Initialize Environment
     *
     * @return void
     *
     */	
    protected function _initEnv()
    {
        switch (APPLICATION_ENV) {
            case 'development':
                @ini_set('display_errors', true);
                break;
            case 'production':
                @ini_set('display_errors', false);
                break;
        }
        if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) {
            YIC_Application::undoMagicQuotes($_GET);
            YIC_Application::undoMagicQuotes($_POST);
            YIC_Application::undoMagicQuotes($_COOKIE);
            YIC_Application::undoMagicQuotes($_REQUEST);
        }
        if (function_exists('get_magic_quotes_runtime') && get_magic_quotes_runtime()) {
            @set_magic_quotes_runtime(false);
        }
    }

    /**
     *
     * Setup application variables
     *
     * @return void
     *
     */
    protected function _initSetup()
    {
        // add library/YIC into autoloader
        $autoloader = Zend_Loader_Autoloader::getInstance();
        $autoloader->registerNamespace('YIC');

    }    
    
}

